<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimpleWindow: Font.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SimpleWindow
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('_font_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">Font.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#include &lt;Windows.h&gt;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="keyword">namespace </span>sw</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span>{</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span>    <span class="keyword">enum class</span> FontWeight : <span class="keywordtype">int</span> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span>        DontCare   = 0,</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span>        Thin       = 100,</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span>        ExtraLight = 200,</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span>        UltraLight = 200,</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span>        Light      = 300,</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span>        Normal     = 400,</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span>        Regular    = 400,</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span>        Medium     = 500,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span>        SemiBold   = 600,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span>        DemiBold   = 600,</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span>        Bold       = 700,</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>        ExtraBold  = 800,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>        UltraBold  = 800,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>        Heavy      = 900,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>        Black      = 900,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>    };</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    <span class="keyword">enum class</span> FontCharSet : uint8_t {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>        ANSI        = ANSI_CHARSET,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>        Baltic      = BALTIC_CHARSET,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>        CheneseBig5 = CHINESEBIG5_CHARSET,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>        Default     = DEFAULT_CHARSET,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>        EastEurope  = EASTEUROPE_CHARSET,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>        GB2312      = GB2312_CHARSET,</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>        Greek       = GREEK_CHARSET,</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>        Hangul      = HANGUL_CHARSET,</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>        Mac         = MAC_CHARSET,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>        Oem         = OEM_CHARSET,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>        Russian     = RUSSIAN_CHARSET,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>        ShiftJIS    = SHIFTJIS_CHARSET,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>        Symbol      = SYMBOL_CHARSET,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>        Turkish     = TURKISH_CHARSET,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>        Vietnamese  = VIETNAMESE_CHARSET,</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>        <span class="comment">// Windows 的朝鲜语版本：</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>        Johab = JOHAB_CHARSET,</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>        <span class="comment">// Windows 中东语言版本：</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>        Arabic = ARABIC_CHARSET,</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>        Hebrew = HEBREW_CHARSET,</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>        <span class="comment">// Windows 的泰语版本：</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>        Thai = THAI_CHARSET,</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>    };</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>    <span class="keyword">enum class</span> FontOutPrecision : uint8_t {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>        Character      = OUT_CHARACTER_PRECIS, <span class="comment">// 未使用。</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>        Default        = OUT_DEFAULT_PRECIS,   <span class="comment">// 指定默认字体映射器行为。</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>        Device         = OUT_DEVICE_PRECIS,    <span class="comment">// 当系统包含多个同名字体时，指示字体映射器选择设备字体。</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>        Outline        = OUT_OUTLINE_PRECIS,   <span class="comment">// 此值指示字体映射器从 TrueType 和其他基于大纲的字体中进行选择。</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>        PostScriptOnly = OUT_PS_ONLY_PRECIS,   <span class="comment">// 指示字体映射器仅从 PostScript 字体中进行选择。 如果系统中没有安装 PostScript 字体，字体映射器将返回到默认行为。</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>        Raster         = OUT_RASTER_PRECIS,    <span class="comment">// 当系统包含多个同名字体时，指示字体映射器选择光栅字体。</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>        String         = OUT_STRING_PRECIS,    <span class="comment">// 字体映射器不使用此值，但在枚举光栅字体时会返回此值。</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>        Stroke         = OUT_STROKE_PRECIS,    <span class="comment">// 字体映射器不使用此值，但在枚举 TrueType、其他基于轮廓的字体和矢量字体时返回此值。</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>        TrueTypeOnly   = OUT_TT_ONLY_PRECIS,   <span class="comment">// 指示字体映射器仅从 TrueType 字体中进行选择。 如果系统中没有安装 TrueType 字体，字体映射器将返回到默认行为。</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>        TrueType       = OUT_TT_PRECIS,        <span class="comment">// 当系统包含多个同名字体时，指示字体映射器选择 TrueType 字体。</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    };</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>    <span class="keyword">enum class</span> FontClipPrecision : uint8_t {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>        CharacterPrecis = CLIP_CHARACTER_PRECIS, <span class="comment">// 未使用。</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>        DefaultPrecis   = CLIP_DEFAULT_PRECIS,   <span class="comment">// 指定默认剪辑行为。</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="preprocessor">#if defined(CLIP_DFA_DISABLE)</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>        DFA_Disable = CLIP_DFA_DISABLE, <span class="comment">// Windows XP SP1： 关闭字体的字体关联。 请注意，此标志不保证在 Windows Server 2003 之后对任何平台产生任何影响。</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>        Embedded  = CLIP_EMBEDDED,  <span class="comment">// 必须指定此标志才能使用嵌入的只读字体。</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>        LH_Angles = CLIP_LH_ANGLES, <span class="comment">// 使用此值时，所有字体的旋转取决于坐标系的方向是左手还是右手。如果未使用，设备字体始终逆时针旋转，但其他字体的旋转取决于坐标系的方向。</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>        Mask      = CLIP_MASK,      <span class="comment">// 未使用。</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="preprocessor">#if defined(CLIP_DFA_OVERRIDE)</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>        DFA_Override = CLIP_DFA_OVERRIDE, <span class="comment">// 关闭字体的字体关联。 这与CLIP_DFA_DISABLE相同，但在某些情况下可能会有问题：建议使用的标志是CLIP_DFA_DISABLE。</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>        StrokePrecis = CLIP_STROKE_PRECIS, <span class="comment">// 字体映射器不使用，但在枚举光栅、矢量或 TrueType 字体时返回。 为了兼容，枚举字体时始终返回此值。</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>        TT_Always    = CLIP_TT_ALWAYS,     <span class="comment">// 未使用。</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>    };</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    <span class="keyword">enum class</span> FontQuality : uint8_t {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>        AntiAliased   = ANTIALIASED_QUALITY,    <span class="comment">// 如果字体支持该字体，并且字体大小不是太小或太大，则字体始终为抗锯齿。</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>        ClearType     = CLEARTYPE_QUALITY,      <span class="comment">// 如果设置，则尽可能使用 ClearType 抗锯齿方法呈现文本。</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>        Default       = DEFAULT_QUALITY,        <span class="comment">// 字体的外观并不重要。</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>        Draft         = DRAFT_QUALITY,          <span class="comment">// 字体的外观不如使用PROOF_QUALITY时重要。 对于 GDI 光栅字体，会启用缩放，这意味着可以使用更多字号，但质量可能较低。 如有必要，将合成粗体、斜体、下划线和删除线字体。</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>        NoAntiAliased = NONANTIALIASED_QUALITY, <span class="comment">// 字体永远不会抗锯齿。</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>        Proof         = PROOF_QUALITY,          <span class="comment">// 字体的字符质量比逻辑字体属性的精确匹配更重要。 对于 GDI 光栅字体，将禁用缩放，并选择大小最接近的字体。 虽然在使用PROOF_QUALITY时可能无法精确映射所选字号，但字体质量较高，外观不会失真。 如有必要，将合成粗体、斜体、下划线和删除线字体。</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>    };</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>    <span class="keyword">enum class</span> FontPitch : uint8_t {</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>        Default  = DEFAULT_PITCH,</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>        Fixed    = FIXED_PITCH,</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>        Variable = VARIABLE_PITCH,</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>    };</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>    <span class="keyword">enum class</span> FontFamily : uint8_t {</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>        Decorative = FF_DECORATIVE, <span class="comment">// 新奇字体。 例如 Old English。</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>        DontCare   = FF_DONTCARE,   <span class="comment">// 使用默认字体。</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>        Modern     = FF_MODERN,     <span class="comment">// 具有固定笔划宽度的字体 (带衬线或无衬线) 的空白字体。 Monospace 字体通常是新式字体。 例如，Pica、Elite 和 CourierNew。</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>        Roman      = FF_ROMAN,      <span class="comment">// 笔划宽度可变的字体 (比例) 和衬线。 例如 MS Serif。</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>        Script     = FF_SCRIPT,     <span class="comment">// 设计为类似于手写的字体。 例如 Script 和 Cursive。</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>        Swiss      = FF_SWISS,      <span class="comment">// 笔划宽度可变的字体 (成比例) 且不带衬线。 例如 MS Sans Serif。</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    };</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
<div class="foldopen" id="foldopen00136" data-start="{" data-end="};">
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html">  136</a></span>    <span class="keyword">class </span><a class="code hl_class" href="classsw_1_1_font.html">Font</a></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    {</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>    <span class="keyword">public</span>:</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a169e7893a4b799bcb3424c5df0d5f54d">  142</a></span>        std::wstring <a class="code hl_variable" href="classsw_1_1_font.html#a169e7893a4b799bcb3424c5df0d5f54d">name</a> = L<span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#aad5569847e5d52c155fe3c1a049324f3">  147</a></span>        <span class="keywordtype">double</span> <a class="code hl_variable" href="classsw_1_1_font.html#aad5569847e5d52c155fe3c1a049324f3">size</a> = 12;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a6c870ded0829330446de69e8c0994a1e">  152</a></span>        <span class="keywordtype">int</span> <a class="code hl_variable" href="classsw_1_1_font.html#a6c870ded0829330446de69e8c0994a1e">escapement</a> = 0;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#af31ac58928f6e0d9d9c90a95f54fd7de">  157</a></span>        <span class="keywordtype">int</span> <a class="code hl_variable" href="classsw_1_1_font.html#af31ac58928f6e0d9d9c90a95f54fd7de">orientation</a> = 0;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span> </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#aa5126e73aad9ba2fd6aab826bac16a5c">  162</a></span>        FontWeight <a class="code hl_variable" href="classsw_1_1_font.html#aa5126e73aad9ba2fd6aab826bac16a5c">weight</a> = FontWeight::DontCare;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#aa7ea90de17d56a063c395cf015baf11f">  167</a></span>        <span class="keywordtype">bool</span> <a class="code hl_variable" href="classsw_1_1_font.html#aa7ea90de17d56a063c395cf015baf11f">italic</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a516d900b06bcd74900eccd55b59bdcba">  172</a></span>        <span class="keywordtype">bool</span> <a class="code hl_variable" href="classsw_1_1_font.html#a516d900b06bcd74900eccd55b59bdcba">underline</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span> </div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a14ae471a9508e23aad832f3060bbcb85">  177</a></span>        <span class="keywordtype">bool</span> <a class="code hl_variable" href="classsw_1_1_font.html#a14ae471a9508e23aad832f3060bbcb85">strikeOut</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span> </div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#ac2b4f997e58b3dcadcaf95e0452599c6">  182</a></span>        FontCharSet <a class="code hl_variable" href="classsw_1_1_font.html#ac2b4f997e58b3dcadcaf95e0452599c6">charSet</a> = FontCharSet::Default;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#aa223c3578a59a96149bd4ef989825e08">  187</a></span>        FontOutPrecision <a class="code hl_variable" href="classsw_1_1_font.html#aa223c3578a59a96149bd4ef989825e08">outPrecision</a> = FontOutPrecision::Default;</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a17830a6ab96c792ea5c31f1dc4eb6b9b">  192</a></span>        FontClipPrecision <a class="code hl_variable" href="classsw_1_1_font.html#a17830a6ab96c792ea5c31f1dc4eb6b9b">clipPrecision</a> = FontClipPrecision::DefaultPrecis;</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span> </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a7098cf91f8c7867df123ef6625fa5831">  197</a></span>        FontQuality <a class="code hl_variable" href="classsw_1_1_font.html#a7098cf91f8c7867df123ef6625fa5831">quality</a> = FontQuality::Default;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>        <span class="comment">/*uint8_t pitchAndFamily;*/</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span> </div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#ae48df531042cb4d94440eadbe61d532b">  207</a></span>        FontPitch <a class="code hl_variable" href="classsw_1_1_font.html#ae48df531042cb4d94440eadbe61d532b">pitch</a> = FontPitch::Default;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a032ab2f362cc53c16c5384f38c1d4888">  212</a></span>        FontFamily <a class="code hl_variable" href="classsw_1_1_font.html#a032ab2f362cc53c16c5384f38c1d4888">family</a> = FontFamily::DontCare;</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span> </div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>    <span class="keyword">public</span>:</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>        <a class="code hl_class" href="classsw_1_1_font.html">Font</a>();</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>        <a class="code hl_class" href="classsw_1_1_font.html">Font</a>(<span class="keyword">const</span> std::wstring &amp;<a class="code hl_variable" href="classsw_1_1_font.html#a169e7893a4b799bcb3424c5df0d5f54d">name</a>, FontCharSet <a class="code hl_variable" href="classsw_1_1_font.html#ac2b4f997e58b3dcadcaf95e0452599c6">charSet</a>);</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>        <a class="code hl_class" href="classsw_1_1_font.html">Font</a>(<span class="keyword">const</span> std::wstring &amp;<a class="code hl_variable" href="classsw_1_1_font.html#a169e7893a4b799bcb3424c5df0d5f54d">name</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classsw_1_1_font.html#aad5569847e5d52c155fe3c1a049324f3">size</a> = 12, FontWeight <a class="code hl_variable" href="classsw_1_1_font.html#aa5126e73aad9ba2fd6aab826bac16a5c">weight</a> = FontWeight::DontCare);</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>        <a class="code hl_class" href="classsw_1_1_font.html">Font</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">LOGFONTW</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">logFont</a>);</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>        <span class="keyword">operator</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">LOGFONTW</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span> </div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#ac38911636974d3f67e7ece35cfc8172e">  224</a></span>        <a class="code hl_class" href="classsw_1_1_dictionary.html">HFONT</a> <a class="code hl_function" href="classsw_1_1_font.html#ac38911636974d3f67e7ece35cfc8172e">CreateHandle</a>();</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span> </div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#a186de58a843c2c87777e04b84623be81">  229</a></span>        <span class="keyword">static</span> <a class="code hl_class" href="classsw_1_1_font.html">Font</a> <a class="code hl_function" href="classsw_1_1_font.html#a186de58a843c2c87777e04b84623be81">GetFont</a>(<a class="code hl_class" href="classsw_1_1_dictionary.html">HFONT</a> <a class="code hl_class" href="classsw_1_1_dictionary.html">hFont</a>);</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="classsw_1_1_font.html#ac3868ad33ae605352723ab3ef0b4a728">  236</a></span>        <span class="keyword">static</span> <a class="code hl_class" href="classsw_1_1_font.html">Font</a> &amp;<a class="code hl_function" href="classsw_1_1_font.html#ac3868ad33ae605352723ab3ef0b4a728">GetDefaultFont</a>(<span class="keywordtype">bool</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">update</a> = <span class="keyword">false</span>);</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>    };</div>
</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>}</div>
<div class="ttc" id="aclasssw_1_1_dictionary_html"><div class="ttname"><a href="classsw_1_1_dictionary.html">sw::Dictionary</a></div><div class="ttdoc">字典类，内部维护了一个指向std::map的智能指针</div><div class="ttdef"><b>Definition</b> Dictionary.h:24</div></div>
<div class="ttc" id="aclasssw_1_1_font_html"><div class="ttname"><a href="classsw_1_1_font.html">sw::Font</a></div><div class="ttdoc">字体类</div><div class="ttdef"><b>Definition</b> Font.h:137</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a032ab2f362cc53c16c5384f38c1d4888"><div class="ttname"><a href="classsw_1_1_font.html#a032ab2f362cc53c16c5384f38c1d4888">sw::Font::family</a></div><div class="ttdeci">FontFamily family</div><div class="ttdoc">字体系列</div><div class="ttdef"><b>Definition</b> Font.h:212</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a14ae471a9508e23aad832f3060bbcb85"><div class="ttname"><a href="classsw_1_1_font.html#a14ae471a9508e23aad832f3060bbcb85">sw::Font::strikeOut</a></div><div class="ttdeci">bool strikeOut</div><div class="ttdoc">是否有删除线</div><div class="ttdef"><b>Definition</b> Font.h:177</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a169e7893a4b799bcb3424c5df0d5f54d"><div class="ttname"><a href="classsw_1_1_font.html#a169e7893a4b799bcb3424c5df0d5f54d">sw::Font::name</a></div><div class="ttdeci">std::wstring name</div><div class="ttdoc">字体的字体名称，此字符串的长度不能超过 32</div><div class="ttdef"><b>Definition</b> Font.h:142</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a17830a6ab96c792ea5c31f1dc4eb6b9b"><div class="ttname"><a href="classsw_1_1_font.html#a17830a6ab96c792ea5c31f1dc4eb6b9b">sw::Font::clipPrecision</a></div><div class="ttdeci">FontClipPrecision clipPrecision</div><div class="ttdoc">裁剪精度</div><div class="ttdef"><b>Definition</b> Font.h:192</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a186de58a843c2c87777e04b84623be81"><div class="ttname"><a href="classsw_1_1_font.html#a186de58a843c2c87777e04b84623be81">sw::Font::GetFont</a></div><div class="ttdeci">static Font GetFont(HFONT hFont)</div><div class="ttdoc">通过HFONT获取字体信息</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a516d900b06bcd74900eccd55b59bdcba"><div class="ttname"><a href="classsw_1_1_font.html#a516d900b06bcd74900eccd55b59bdcba">sw::Font::underline</a></div><div class="ttdeci">bool underline</div><div class="ttdoc">是否有下划线</div><div class="ttdef"><b>Definition</b> Font.h:172</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a6c870ded0829330446de69e8c0994a1e"><div class="ttname"><a href="classsw_1_1_font.html#a6c870ded0829330446de69e8c0994a1e">sw::Font::escapement</a></div><div class="ttdeci">int escapement</div><div class="ttdoc">转义向量与设备的 x 轴之间的角度（以十分之一度为单位）</div><div class="ttdef"><b>Definition</b> Font.h:152</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_a7098cf91f8c7867df123ef6625fa5831"><div class="ttname"><a href="classsw_1_1_font.html#a7098cf91f8c7867df123ef6625fa5831">sw::Font::quality</a></div><div class="ttdeci">FontQuality quality</div><div class="ttdoc">输出质量</div><div class="ttdef"><b>Definition</b> Font.h:197</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_aa223c3578a59a96149bd4ef989825e08"><div class="ttname"><a href="classsw_1_1_font.html#aa223c3578a59a96149bd4ef989825e08">sw::Font::outPrecision</a></div><div class="ttdeci">FontOutPrecision outPrecision</div><div class="ttdoc">输出精度</div><div class="ttdef"><b>Definition</b> Font.h:187</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_aa5126e73aad9ba2fd6aab826bac16a5c"><div class="ttname"><a href="classsw_1_1_font.html#aa5126e73aad9ba2fd6aab826bac16a5c">sw::Font::weight</a></div><div class="ttdeci">FontWeight weight</div><div class="ttdoc">字体的粗细，范围为 0 到 1000</div><div class="ttdef"><b>Definition</b> Font.h:162</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_aa7ea90de17d56a063c395cf015baf11f"><div class="ttname"><a href="classsw_1_1_font.html#aa7ea90de17d56a063c395cf015baf11f">sw::Font::italic</a></div><div class="ttdeci">bool italic</div><div class="ttdoc">是否为斜体</div><div class="ttdef"><b>Definition</b> Font.h:167</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_aad5569847e5d52c155fe3c1a049324f3"><div class="ttname"><a href="classsw_1_1_font.html#aad5569847e5d52c155fe3c1a049324f3">sw::Font::size</a></div><div class="ttdeci">double size</div><div class="ttdoc">字体大小，以dip为单位</div><div class="ttdef"><b>Definition</b> Font.h:147</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_ac2b4f997e58b3dcadcaf95e0452599c6"><div class="ttname"><a href="classsw_1_1_font.html#ac2b4f997e58b3dcadcaf95e0452599c6">sw::Font::charSet</a></div><div class="ttdeci">FontCharSet charSet</div><div class="ttdoc">字符集</div><div class="ttdef"><b>Definition</b> Font.h:182</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_ac3868ad33ae605352723ab3ef0b4a728"><div class="ttname"><a href="classsw_1_1_font.html#ac3868ad33ae605352723ab3ef0b4a728">sw::Font::GetDefaultFont</a></div><div class="ttdeci">static Font &amp; GetDefaultFont(bool update=false)</div><div class="ttdoc">获取默认字体，可修改返回的引用来更改控件的默认字体，当首次调用或参数update为true时会获取系统默认字体（已创建的控件字体不会因此改变）</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_ac38911636974d3f67e7ece35cfc8172e"><div class="ttname"><a href="classsw_1_1_font.html#ac38911636974d3f67e7ece35cfc8172e">sw::Font::CreateHandle</a></div><div class="ttdeci">HFONT CreateHandle()</div><div class="ttdoc">创建HFONT句柄</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_ae48df531042cb4d94440eadbe61d532b"><div class="ttname"><a href="classsw_1_1_font.html#ae48df531042cb4d94440eadbe61d532b">sw::Font::pitch</a></div><div class="ttdeci">FontPitch pitch</div><div class="ttdoc">字体的间距和系列</div><div class="ttdef"><b>Definition</b> Font.h:207</div></div>
<div class="ttc" id="aclasssw_1_1_font_html_af31ac58928f6e0d9d9c90a95f54fd7de"><div class="ttname"><a href="classsw_1_1_font.html#af31ac58928f6e0d9d9c90a95f54fd7de">sw::Font::orientation</a></div><div class="ttdeci">int orientation</div><div class="ttdoc">每个字符的基线和设备 x 轴之间的角度（以十分之一度为单位）</div><div class="ttdef"><b>Definition</b> Font.h:157</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_01fcd3835fb4e7d9331b722d86291b65.html">sw</a></li><li class="navelem"><a class="el" href="dir_ed5f6ece24ffcc4307a76d27c2494db3.html">inc</a></li><li class="navelem"><b>Font.h</b></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
